<%@ page import="com.example.oa.Employee" %><%--
  Created by IntelliJ IDEA.
  User: 徐永岳
  Date: 2023/3/13
  Time: 21:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8"  %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
  <title>employee page</title>
</head>
<body>

<h1>employee page</h1>
<c:if test="${sessionScope.role ne 0}">
  <c:redirect url="index.jsp"/>
</c:if>
<%--<%
  Employee employee = (Employee) session.getAttribute("employee");
  out.print(employee.getId());
  out.print("<br>");
  out.print(employee.getName());
  out.print("<br>");
  out.print(employee.getAge());
  out.print("<br>");
  out.print(employee.getGender());
  out.print("<br>");
%>--%>
<h3>Welcome:${sessionScope.name}</h3>

	${sessionScope.employee.id}
	${sessionScope.employee.name}
	${sessionScope.employee.age}
	${sessionScope.employee.gender}
	<a href="/employee?action=sign_out">Sign out</a>
</body>
</html>
